<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>

<html>
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<jsp:include page="/core/tool/resources.jsp"></jsp:include>
	<script src="./acount.js"></script>

</head>

<body class="easyui-layout" style="text-align:left">

	<div data-options="region:'west',split:true, title:'账户列表'" style="width:350px">
		<table id="dg" class="easyui-datagrid" style="margin-top:20px"
	            data-options="rownumbers:true, singleSelect:true, sortOrder:'asc', sortName:'acountId', remoteSort:false, fit:true, onClickRow:clickAcount ">
	        <thead>
	            <tr>
	           	 	<th data-options="field:'acountId',width:60" sortable="true">账户ID</th>
	                <th data-options="field:'acountName',width:80">账户名</th>
	                <th data-options="field:'acountDesc',width:300">账户说明</th>
	            </tr>
	        </thead>
	    </table>
	</div>


	<div  class="easyui-layout" data-options="region:'center',split:true, title:'基本设置'">
		<div id="toolbar">
		   <a class="easyui-linkbutton" iconCls="icon-add" onclick="javascript:$('#dg2').edatagrid('addRow')">增加</a>
		   <a class="easyui-linkbutton" iconCls="icon-remove" onclick="javascript:$('#dg2').edatagrid('destroyRow')">删除</a>
		   <a class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dg2').edatagrid('cancelRow')">取消</a>
		   <a class="easyui-linkbutton" iconCls="icon-save" onclick="click_save()">保存</a> 
		   <a class="easyui-linkbutton" iconCls="icon-reload" onclick="loadAcountInitStatus()">刷新</a>
		   <a class="easyui-linkbutton" iconCls="" onclick="click_ex_test()">接口测试</a> 
	       <form id="ff"  class="easyui-form">
				<table cellpadding="5">
					<tr>
						<td>开始日期:</td>
						<td><input class="easyui-datebox" required=true name="initDate"/></td>
						<td>结束日期:</td>
						<td><input class="easyui-datebox" name="endDate"/></td>
						<td>初始现金:</td>
						<td><input class="easyui-numberbox" required=true name="initCash"/></td>
					</tr>
					<tr>
						<td>比较指数:</td>
						<td><input class="easyui-textbox" name="cmpIndex"/></td>
						<td>实盘账户:</td>
						<td><input class="easyui-combobox" name="realAcount" data-options="valueField:'code',textField:'name',data:frame.flex.getValue('BASE_TRUEFALSE')"/></td>
						<td>外部接口:</td>
						<td><input class="easyui-combobox" name="exSystem" data-options="valueField:'code',textField:'name',data:frame.flex.getValue('TRADE_EX_SYSTEM')"/></td>
					</tr>
					<tr>
						<td>接口配置:</td>
						<td colspan="5"><input class="easyui-textbox" name="exSystemConfig"  data-options="width:600,height:50,multiline:true"/></td>
					</tr>
				</table>
			</form>  
		</div>

		<table id="dg2"  class="easyui-edatagrid"
			data-options="singleSelect:true,collapsible:true,rownumbers:true, editing:true, fitColumns:true, fit:true,
				 	sortOrder:'desc', sortName:'rating', title:'初始持仓', editing:true">
	        <thead>
	            <tr>
	           	 	<th data-options="field:'secId',width:100" 
	           	 		editor="{type:'combogrid',
	           	 		 	options:{panelWidth:450,
							    idField:'secId',    
							    textField:'secId', 
							    pagination:true, sortOrder:'asc', sortName:'secId', rownumbers:true, fitColumns:true,
							    url:'<%=request.getContextPath()%>/smdc/security/page.json',
							    columns:[[    
							        {field:'secId',title:'代码',width:60},    
							        {field:'secName',title:'名称',width:100},    
							        {field:'secType',title:'类别',width:120},    
							    ]]}
							   }">代码</th>
	           	 	<th data-options="field:'secName',width:100, formatter:secNameFomatter">名称</th>
	           	 	<th data-options="field:'secNum',width:100, editor:'numberbox'">数量</th>
	            </tr>
	        </thead>
	    </table>
		
	</div>
    
</body>
</html>
